1. Field of the Invention
The present invention relates to an image processing apparatus and method for compressing image data, and a storage medium storing this method.
2. Description of the Related Art
In recent years, improved image processing techniques have increased the resolution of image input apparatuses, and therefore also have caused an associated increase in the size of image data being processed. As a result, the memory capacity required for storing such image data has also become larger, and it now generally takes a greater amount of time than was previously required to transmit the image data via a communication line.
However, since the image data has redundancy, the elimination of this redundancy allows the amount of data to be reduced. Accordingly, before image data is stored or transmitted, image compression and coding is performed to eliminate the redundancy possessed by the image data, and to delete a selected amount of information to an extent that deterioration of image quality is difficult to recognize visually.
In recent years, image compression and coding using wavelet transforms has attracted attention. For example, in image compression and coding, an image to be coded is subjected to a wavelet transform in order to be divided into a plurality of frequency bands (sub-bands), after which the transform coefficients of each frequency band are quantized, and the quantization results are entropy-coded.
An example of a known method for performing a wavelet transform to image data is shown in FIGS. 9A, 9B, 9C, and 9D. The method includes steps of separating high-frequency components (H) and low-frequency components (L) by performing one-dimensional filtering (FIG. 9B) on the original image (FIG. 9A), performing one-dimensional filtering (FIG. 9C) in the vertical direction, causing the image to be divided into four sub-bands LL, LH, HL, and HH, and then repeating a similar four-division process (FIG. 9D) on the sub-band LL1 corresponding to the low-frequency components. FIG. 10 shows an example of a case in which the above-described two-dimensional wavelet transform is repeated three times.
Conventionally, in order to perform such a wavelet transform, a process was performed in which an image to be coded for one screen, such as that shown in FIG. 9A, is held in a memory, and then each time the process proceeds to FIGS. 9B and 9C, the original memory is replaced with the new data. As a result, a buffer that is large enough for storing one screen (the size of the image on which a wavelet transform was performed a first time) is required at a minimum.
However, there is a problem in that the use of such a memory for storing one screen increases the expense of the image processing apparatus. Therefore, it would be desirable to overcome that problem and to minimize the amount of memory capacity required for performing a wavelet transform.
The present invention solves the above-described problems. It is an object of the present invention to minimize the amount of memory storage capacity required for compressing an image using a wavelet transform.
To achieve the above-mentioned object, according to one aspect of the present invention, an image processing apparatus is provided, comprising: a first transform unit for frequency-transforming, in a one-dimensional direction, image data to be coded; a second transform unit for frequency-transforming, in a different one-dimensional direction, at least some of the frequency components obtained by the first transform unit; and a coding unit for entropy-coding those ones of the frequency components which are not frequency-transformed by the second transform unit among the frequency components obtained by the first transform unit, and for entropy-coding the frequency components obtained by the second transform unit.
According to another aspect of the present invention, an image processing apparatus is provided, comprising: a detection unit for detecting the size of image data to be coded; a first transform unit for frequency-transforming, in a one-dimensional direction, image data to be coded; a second transform unit for further frequency-transforming all of the frequency components obtained by the first transform unit in a different one-dimensional direction, when the detected size is smaller than a predetermined size, and for further frequency-transforming, in the different one-dimensional direction, at least some of the frequency components obtained by the first transform unit, when the detected size is larger than the predetermined size; and a coding unit for entropy-coding the frequency components obtained by the second transform unit. The coding unit also entropy-codes the frequency components which were not frequency transformed by the second transform unit, but which were obtained by the first transform unit.
According to another aspect of the present invention, an image processing apparatus is provided, comprising: an input unit for inputting, a plurality of times, same image data to be coded; a first transform unit for frequency-transforming, in a one-dimensional direction, the image data input from the input unit an n-th time in order to obtain a first frequency component; a second transform unit for frequency-transforming, in the one-dimensional direction, the image data input from the input unit an m-th time (M being greater than N), in order to obtain a second frequency component; a storage unit for selectively storing either one of the first and second frequency components; and a third transform unit for frequency-transforming, in a different one-dimensional direction, one of the first and second frequency components stored in the storage unit.